#include <iostream>
#include <stdlib.h>
using namespace std;

char * strcpy(char * src){
	int i,j;
	
	  while(src==NULL)
		
		return NULL;

	for (i=0;src[i]!='\0';i++);
	
	char *src1=(char *)malloc((i+1)*sizeof(char *));
	
	for (j=0;j<i;j++){
		src1[j]=src[j];
		
	}
	src1[j]='\0';
	return src1;
} 

int main (void ){
	
	char a[10]="string";
	cout<<strcpy(a);
	
	return 0;
}
